package com.leyou.item.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.leyou.item.entity.Sku;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

public interface SkuMapper extends BaseMapper<Sku> {
    @Update("UPDATE tb_sku SET stock=stock-#{num} WHERE id = #{skuId}")
    public void minusStock(@Param("skuId") Long skuId, @Param("num") Integer num);
}